package com.sjgtw.cloud.system.api.service;

import com.sjgtw.cloud.common.core.constant.ServiceNameConstants;
import com.sjgtw.cloud.common.core.domain.R;
import com.sjgtw.cloud.system.api.domain.SysRole;
import com.sjgtw.cloud.system.api.fallbackfactory.RemoteRoleFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * <p>Title: 角色信息数据API</p>
 * <p>Description: </p>
 * @author Admin
 * @date 2021-8-13
 */
@FeignClient(contextId = "remoteRoleService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteRoleFallbackFactory.class)
public interface RemoteRoleService
{
	
	/**
	 * <p>Title: 通过角色roleKey查询角色</p>
	 * <p>Description: </p>
	 * @param roleKey 角色权限
	 * @return 角色信息
	 */
    @GetMapping(value = "/role/findrole/{roleKey}")
    public R<SysRole> findRoleByRoleKey(@PathVariable("roleKey") String roleKey);

}
